Skip to content

fix: bound Cursor Connect frame buffering - #844

Closed
Ingwannu wants to merge 1 commit into
devfrom
agent/bound-cursor-connect-frames
Closed

fix: bound Cursor Connect frame buffering#844
Ingwannu wants to merge 1 commit into
devfrom
agent/bound-cursor-connect-frames

Conversation

@Ingwannu

@Ingwannu Ingwannu commented Aug 1, 2026

Copy link
Copy Markdown
Owner

Summary

  • keep uint32-compatible outbound Connect frames while limiting inbound payloads to 32 MiB
  • reject an oversized declared length as soon as the five-byte header arrives
  • incrementally complete one pending frame instead of repeatedly concatenating it with unrelated following frames
  • fail a turn when EOF leaves an incomplete Connect frame

Part of #820. The 32 MiB inbound limit matches the repository existing framing-hardening design note (devlog/_fin/350_cursor-provider-add/116_phase33-connect-framing-robustness-plan.md).

Verification

  • bun test tests/cursor-framing.test.ts tests/cursor-hardening.test.ts tests/cursor-live-transport.test.ts (45 pass)
  • bun run typecheck
  • bun run privacy:scan

Compatibility

Normal split headers, split payloads, and multiple frames per chunk preserve their order. A legitimate inbound frame larger than 32 MiB now fails explicitly; outbound framing remains unchanged.

@coderabbitai

coderabbitai Bot commented Aug 1, 2026

Copy link
Copy Markdown

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 7ce4af2c-7ef7-4ec9-a45e-8f2170610a4c

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Comment @coderabbitai help to get the list of available commands.

@Ingwannu

Ingwannu commented Aug 1, 2026

Copy link
Copy Markdown
Owner Author

CI follow-up: the initial macOS failure was the same Bun 1.3.14 Trace/BPT trap / bun.report signature seen on unrelated PR #841. The failed job passed on rerun, while the other platform jobs were already green. No code change was needed.

@lidge-jun

Copy link
Copy Markdown
Owner

Maintainer triage: this is a narrow and valuable hardening change. It bounds inbound Cursor Connect frame buffering and rejects incomplete streams instead of allowing unbounded or ambiguous framing state.

The branch currently conflicts with dev, so it needs a rebase before it can land. It also shares the Cursor transport/docs surface with #845; please land the two PRs in a defined order (or consolidate them) to avoid overlapping changes and documentation drift.

Because this is co-maintainer-authored, an independent non-author review is still required before landing. Thanks for keeping the scope focused.

@lidge-jun

Copy link
Copy Markdown
Owner

Superseded by #892, which implements this defect's fix natively on top of the wave-1 retained-state framework (the PR's shape was used as a reference; see the PR description in #892 for the defect-specific deltas, including where the framework already covered part of it). Thank you for the contribution — the analysis in this PR drove the fix.

@lidge-jun lidge-jun closed this Aug 2, 2026
olddonkey pushed a commit to olddonkey/opencodex that referenced this pull request Aug 2, 2026
Campaign preparation (docs-only): five units under devlog/_plan/260802_wtN_*
with 000 research + 010 implementation roadmaps, claim ledgers verified by a
lunasearch fan-out (Anthropic 1M windows, Copilot mixed-wire, DeepSeek
service_tier, WHATWG extension origins, POSIX rename-over-symlink).

wt1 update-path: PR lidge-jun#871, issue lidge-jun#879 (star-prompt deferral leakage), lidge-jun#557 optional
wt2 zero-leak: PRs lidge-jun#840 lidge-jun#841 lidge-jun#843 lidge-jun#844 lidge-jun#845 lidge-jun#847 (tracker lidge-jun#820)
wt3 provider-wire: PRs lidge-jun#746 lidge-jun#860 lidge-jun#839/lidge-jun#854, issue lidge-jun#875 triage, lidge-jun#616/lidge-jun#837 optional
wt4 server-config: PRs lidge-jun#850 (CORS origin confusion), lidge-jun#869 (symlink destruction)
wt5 windows-service: PRs lidge-jun#868, lidge-jun#861 (issue lidge-jun#848)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants